{% extends "bootstrap/base.html" %}

{% block title %}WM-Buddy{% endblock %}

{% block head %}
    {{ super() }}
    <link rel="shortcut icon" href="{{ url_for('static', filename='') }}" type="image/x-icon">
    <link rel="icon" href="{{ url_for('static', filename='') }}" type="image/x-icon">
{% endblock %}

{% block navbar %}
    <div class="navbar navbar-inverse" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{ url_for('main.index') }}">WaterMark</a>
            </div>
            <div class="navbar-collapse collapse">

                <ul class="nav navbar-nav">
                    <li><a href="{{ url_for('main.index') }}">主页</a></li>
                </ul>

                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">PPT水印添加<b
                                class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="{{ url_for('main.genwm_add') }}">生成盲水印</a></li>
                            <li><a href="{{ url_for('main.comwm_add') }}">生成传统水印</a></li>
                            <li><a href="{{ url_for('main.selfwm_add') }}">上传盲水印</a></li>
                        </ul>
                    </li>
                </ul>

                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">图片水印添加<b
                                class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="{{ url_for('main.genpic_add') }}">生成盲水印</a></li>
                            <li><a href="{{ url_for('main.compic_add') }}">生成传统水印</a></li>
                            <li><a href="{{ url_for('main.selfpic_add') }}">上传盲水印</a></li>
                        </ul>
                    </li>
                </ul>

                <ul class="nav navbar-nav">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">水印提取<b
                                class="caret"></b></a>
                        <ul class="dropdown-menu">
                            <li><a href="{{ url_for('main.wm_ppt_withdraw') }}">提取PPT水印</a></li>
                            <li><a href="{{ url_for('main.wm_img_withdraw') }}">提取图片水印</a></li>
                        </ul>
                    </li>
                </ul>

                <ul class="nav navbar-nav navbar-right">
                    {% if current_user.is_authenticated %}
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ current_user.email }}<b
                                    class="caret"></b></a>
                            <ul class="dropdown-menu">
                                <li><a href="{{ url_for('auth.change_password') }}">修改密码</a></li>
                                <li><a href="{{ url_for('auth.logout') }}">登出</a></li>
                            </ul>
                        </li>
                    {% else %}
                        <li><a href="{{ url_for('auth.login') }}">登入</a></li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </div>
{% endblock %}

{% block content %}
    <div class="container">
        {% for message in get_flashed_messages() %}
            <div class="alert alert-warning">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                {{ message }}
            </div>
        {% endfor %}

        {% block page_content %}{% endblock %}
    </div>

{% endblock %}


{% block scripts %}
    {{ super() }}
{% endblock %}

